 <?php
 $tourbooking = $_POST['tourbooking'];  // id tour 
 ?>
 <script type="text/javascript" src="<?php bloginfo('template_url');?>/js/mybookingtour.js"></script>	
	 		<style>
				 p label.contact_error
				{
					display:none;
				}
				 p label.contact_error_show
				{
					display:block;
					color:red;
					font-weight:bold;
					float:left;
					margin-left:5px;
					width:20px;
				}
			</style>
 <div id="content-right">        	
           	<!--begin box - content-->
			<div class="gioi-thieu tientrinh1 dattour">
            <span class="iconhome"></span>
            <div class="btbreakcumb">
            <?php bt_breadcrumb();?>
            </div>
	            <h1>Booking Tour</h1>                
                <ul class="bgtientrinh">
          <li class="current-page-item page-item ht"><span>Tour Information &nbsp;&nbsp;</span></li>
          <li class="page-item cm"><span>Customer Information</span></li>
          <li class=" page-item cr"><span>Credit Card For The Booking Payment</span></li>
        </ul>
		        <div class="clear"></div>
        		<form action="" method="post">        		
				 <p><label class="ten">Tour:</label>
                	<?php echo get_the_title($tourbooking);?>	
                </p>
				 <p><label class="ten">Destination form :</label>
                	<?php echo get_post_meta($tourbooking, $wpdb->prefix.'destination_from',true);?>	
                </p>
				 <p><label class="ten">Destination to:</label>
                	<?php echo get_post_meta($tourbooking, $wpdb->prefix.'destination_to',true);?>	
                </p>
				<p><label class="ten">Leght of stay :</label>
                	<?php echo get_post_meta($tourbooking, $wpdb->prefix.'lenght_of_stay',true);?>	
                </p>
                <p><label class="ten">Travel in party of : <span class="red">*</span></label>
                	<select name="travel_in_party_of" id="travel_in_party_of">
                                	<?php
                                	$travel_in_list = db_travel_in_party_of();
                                	foreach ($travel_in_list as $key=>$value) 
                                	{
                                		$key+=1;
                                	?>
                                		<option value="<?php echo $key;?>"><?php echo $value;?></option>
                                	<?php 	
                                	} 
                                	?>
                                </select>
                </p>
                <p><label class="ten">Type tour : <span class="red">*</span></label>
                	<select name="type_tour" id="type_tour">
                                	<?php db_select_option_tour_type("standard");?>
                                </select>
                </p>
                
                <p><label class="ten">Propose Date of Tour: <span class="red">*</span></label>
                	<?php
                            	$nowDate = date('d');
                            	$nowMonth = date('m');
                            	$nowYear = date('Y'); 
                            	?>
                                <select name="propose_day" id="propose_day">
                                	<?php db_select_option_date($nowDate);?>
                                </select>
                                <select name="propose_mo" id="propose_mo">
                                	<?php db_select_option_month($nowMonth);?>
                                </select>
                                <select name="propose_ya" id="propose_ya">
                                	<?php db_select_option_year_checkIn($nowYear);?>
                                </select>
                                <label id="contact_error_propose" class="contact_error">*</label>
                </p>  
                
               <p><label class="ten">Price: </label>                          	
                            	<?php 
                            		//$tour_price = get_post_meta($tour_ID, $wpdb->prefix.'price',true);
                            		//$tourID = $tour_ID;
									//$list_price = db_select_all_data_by_tourID("tour_price",$tourID);
									//print_r($list_price);
									foreach ($travel_in_list as $keys=>$value) 
									{		
										$keys+=1;								
										$pricess = db_select_data_by_char_two("tour_price", "travelinparty", $value,"tourID",$tourbooking);
										if($pricess)
										{
											//$step=db_vietnamese_slug($value);
											$myval = $pricess[0]->standard.'*|*'.$pricess[0]->superior.'*|*'.$pricess[0]->firstclass.'*|*'.$pricess[0]->deluxe;
											//print_r($pricess);
										}
										else 
											$myval ="";
											?>
											<input type="hidden" name="price_name_<?php echo $keys;?>" id="price_name_<?php echo $keys;?>" value="<?php echo $myval;?>">
											<?php
										 
									}
                            	?>
                                <!-- <span class="price"><?php echo $tour_price;?> USD</span>-->
                                <input readonly="readonly" style="border: none; font-weight: bold; color: #666; width: 45px;" class="price" name="show_tour_price" id="show_tour_price" value="">USD
                                <input type="hidden" name="hidden_tour_price" id="hidden_tour_price" value="<?php echo $tour_price;?>">
                            </p>
                            <p>
                            	<label class="ten">Deposit:</label>
                            	<?php 
                            	$deposit = db_get_list_tour_type();
                            	foreach ($deposit as $key=>$value) 
                            	{
                            		$deposit_id = "deposit_name_".$key;
                            		$deposit_vl = intval(get_option($deposit_id));
                            	?>
                            	<input type="hidden" name="<?php echo $deposit_id;?>" id="<?php echo $deposit_id;?>" value="<?php echo $deposit_vl;?>">
                            	<?php 	
                            	}
                            	?>
                            	<!-- 
                                <span class="price"><?php echo $deposit;?> USD</span>
                                -->   
                                <input type="hidden" name="mybooking" value="tours"/> 
                                <input readonly="readonly" style="border: none; font-weight: bold; color: #666; width: 45px;" class="price" name="deposit_tour" id="deposit_tour" value="">USD  
                                <input type="hidden" name="book_deposit_tour" id="book_deposit_tour" value="">  
                                <input type="hidden" name="tourbooking" value="<?php echo $tourbooking;?>">
                                 <input type="submit" value="Next" />                         
                            </p>                
                
                <?php wp_nonce_field('act_activation_booking_go2','act_activation_booking_go2');?>
                </form>
				
            </div>
            
        
        </div>